<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <h5 class="modal-title">编辑资产</h5>
</div>
<div class="modal-body"style="width: 800px;">
	<div class="rows">
        <div class="col-xs-offset-1 col-xs-10 col-xs-offset-1">
	<!--:include('_form.html',{subjectAssets:subjectAssets}){}  -->
		</div>
	</div>
</div> 
<div class="modal-footer clearfixed">
	<div class="rows">
		<div class="col-xs-12">
	    <button type="button" class="btn btn-info btn-xs no-border" onclick="_doUpdate();">保存</button>
	    <button type="button" class="btn btn-info btn-xs no-border" data-dismiss="modal" aria-label="Close">关闭</button>
		</div>
	</div>
</div>
<script type="text/javascript">
function _doUpdate(){
	if(!validate("form-assets")){
		return false;
	}
	var params = {};
	params['subjectAssets.uuid'] = $("#subjectAssets-uuid").val();
	params['subjectAssets.name'] = $("#subjectAssets-name").val();
	params['subjectAssets.sub_uuid'] = $("#subjectAssets-sub_uuid").val();
	if(params['subjectAssets.sub_uuid'] == ""){
		params['subjectAssets.sub_name'] = "";
	}else{
		params['subjectAssets.sub_name'] = $("#subjectAssets-sub_uuid").find("option:selected").text();;
	}
	params['subjectAssets.url'] = $("#subjectAssets-url").val();
	params['subjectAssets.img_url'] = $("#subjectAssets-img").val();
	params['subjectAssets.focus_img_url'] = $("#subjectAssets-focus-img").val();
	params['remark'] = $("#subject-remark").val(); 
	$.ajax({
		type : "POST",
		url : "mnui/sub/assets/doUpdate",
		data : params,
		success : function(data) {
			if (data.status == "OK") {
				$("#table-assets").bootstrapTable('refresh');
				hideModal();
				TipMsg.success(data.message, 0);
			} else {
				TipMsg.error(data.message, 0);
			}
		}
	});
}
</script>